home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / uriloader / nsIContentHandler.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  114 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIContentHandler.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIContentHandler_h__
  6. #define __gen_nsIContentHandler_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIRequest; /* forward declaration */
  18.  
  19. class nsIInterfaceRequestor; /* forward declaration */
  20.  
  21.  
  22. /* starting interface:    nsIContentHandler */
  23. #define NS_ICONTENTHANDLER_IID_STR "49439df2-b3d2-441c-bf62-866bdaf56fd2"
  24.  
  25. #define NS_ICONTENTHANDLER_IID \
  26.   {0x49439df2, 0xb3d2, 0x441c, \
  27.     { 0xbf, 0x62, 0x86, 0x6b, 0xda, 0xf5, 0x6f, 0xd2 }}
  28.  
  29. class NS_NO_VTABLE nsIContentHandler : public nsISupports {
  30.  public: 
  31.  
  32.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICONTENTHANDLER_IID)
  33.  
  34.   /**
  35.    * Tells the content handler to take over handling the content. If this
  36.    * function succeeds, the URI Loader will leave this request alone, ignoring
  37.    * progress notifications. Failure of this method will cause the request to be
  38.    * cancelled, unless the error code is NS_ERROR_WONT_HANDLE_CONTENT (see
  39.    * below).
  40.    *
  41.    * @param aWindowContext
  42.    *        Window context, used to get things like the current nsIDOMWindow
  43.    *        for this request. May be null.
  44.    * @param aContentType
  45.    *        The content type of aRequest
  46.    * @param aRequest
  47.    *        A request whose content type is already known.
  48.    *
  49.    * @throw NS_ERROR_WONT_HANDLE_CONTENT Indicates that this handler does not
  50.    *        want to handle this content. A different way for handling this
  51.    *        content should be tried.
  52.    */
  53.   /* void handleContent (in string aContentType, in nsIInterfaceRequestor aWindowContext, in nsIRequest aRequest); */
  54.   NS_IMETHOD HandleContent(const char *aContentType, nsIInterfaceRequestor *aWindowContext, nsIRequest *aRequest) = 0;
  55.  
  56. };
  57.  
  58. /* Use this macro when declaring classes that implement this interface. */
  59. #define NS_DECL_NSICONTENTHANDLER \
  60.   NS_IMETHOD HandleContent(const char *aContentType, nsIInterfaceRequestor *aWindowContext, nsIRequest *aRequest); 
  61.  
  62. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  63. #define NS_FORWARD_NSICONTENTHANDLER(_to) \
  64.   NS_IMETHOD HandleContent(const char *aContentType, nsIInterfaceRequestor *aWindowContext, nsIRequest *aRequest) { return _to HandleContent(aContentType, aWindowContext, aRequest); } 
  65.  
  66. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  67. #define NS_FORWARD_SAFE_NSICONTENTHANDLER(_to) \
  68.   NS_IMETHOD HandleContent(const char *aContentType, nsIInterfaceRequestor *aWindowContext, nsIRequest *aRequest) { return !_to ? NS_ERROR_NULL_POINTER : _to->HandleContent(aContentType, aWindowContext, aRequest); } 
  69.  
  70. #if 0
  71. /* Use the code below as a template for the implementation class for this interface. */
  72.  
  73. /* Header file */
  74. class nsContentHandler : public nsIContentHandler
  75. {
  76. public:
  77.   NS_DECL_ISUPPORTS
  78.   NS_DECL_NSICONTENTHANDLER
  79.  
  80.   nsContentHandler();
  81.  
  82. private:
  83.   ~nsContentHandler();
  84.  
  85. protected:
  86.   /* additional members */
  87. };
  88.  
  89. /* Implementation file */
  90. NS_IMPL_ISUPPORTS1(nsContentHandler, nsIContentHandler)
  91.  
  92. nsContentHandler::nsContentHandler()
  93. {
  94.   /* member initializers and constructor code */
  95. }
  96.  
  97. nsContentHandler::~nsContentHandler()
  98. {
  99.   /* destructor code */
  100. }
  101.  
  102. /* void handleContent (in string aContentType, in nsIInterfaceRequestor aWindowContext, in nsIRequest aRequest); */
  103. NS_IMETHODIMP nsContentHandler::HandleContent(const char *aContentType, nsIInterfaceRequestor *aWindowContext, nsIRequest *aRequest)
  104. {
  105.     return NS_ERROR_NOT_IMPLEMENTED;
  106. }
  107.  
  108. /* End of implementation class template. */
  109. #endif
  110.  
  111. #define NS_ERROR_WONT_HANDLE_CONTENT   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_URILOADER, 1)
  112.  
  113. #endif /* __gen_nsIContentHandler_h__ */
  114.